package y23.Oct;

import java.util.Arrays;
import java.util.Scanner;

public class Test12 {
    public static void main(String[] args) {
        System.out.println(med(2,2));
        System.out.println(med(2,3));
        System.out.println(med(2,4));
        System.out.println(med(2,5));
        System.out.println(med(2,6));
        System.out.println(med(2,7));
        System.out.println(med(2,8));
        System.out.println("-----------------------");
        System.out.println(med(3,2));
        System.out.println(med(3,3));
        System.out.println(med(3,4));
        System.out.println(med(3,5));
        System.out.println(med(3,6));
        System.out.println(med(3,7));
        System.out.println(med(3,8));
        System.out.println("-----------------------");
        System.out.println(med(4,2));
        System.out.println(med(4,3));
        System.out.println(med(4,4));
        System.out.println(med(4,5));
        System.out.println(med(4,6));
        System.out.println(med(4,7));
        System.out.println(med(4,8));
        System.out.println("-----------------------");
        System.out.println(med(5,2));
        System.out.println(med(5,3));
        System.out.println(med(5,4));
        System.out.println(med(5,5));
        System.out.println(med(5,6));
        System.out.println(med(5,7));
        System.out.println(med(5,8));
        System.out.println("-----------------------");
        System.out.println(med(6,2));
        System.out.println(med(6,3));
        System.out.println(med(6,4));
        System.out.println(med(6,5));
        System.out.println(med(6,6));
        System.out.println(med(6,7));
        System.out.println(med(6,8));

        Scanner scanner = new Scanner(System.in);
        int[] arr = new int[10];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = scanner.nextInt();
        }
        Arrays.sort(arr);
        System.out.println(Arrays.toString(arr));


    }
    public static int med(int m, int n ){
        int sum = 1;
        int count = 1;
        while(n>0){
            sum*=(m+n);
            count*=n;
            n--;
        }
        return sum/count;
    }

}
/*
int main() {
	double sum = 0.0, ar = 0.0; //定义双精度变量
	long int n = 2, count = 0; //count 循环计数
	while ((1 - sum) > 0.0000001) {
		ar = 1.0 / n;
		sum += ar;
		n *= 2;
		count++;
	}
	printf("count=%ld", n);
	return 0;
}
 */
/*
        double x = 1;
        while(Math.abs(g(x)-g_taylor(x))>1e-6){
            x/=2;
        }
        System.out.println(x);
    }
    public static double g(double x){
        return Math.pow(x,3)+10;
    }

    public static double g_taylor(double x){
        return 10+Math.pow(x,3);
    }
 */
